<?php
	@session_start();
	include("../../connect/connect_mysql.php");
	$act= $_POST["act"];

	if($act == 'addcontent'){
		$page= $_POST["name"];
		$date= $_POST["date"];
		$info= $_POST["text"];
		$query = "SELECT * FROM page WHERE name = '$page'";
		$rs= mysql_query($query);
		if($rs){
			while ($row = mysql_fetch_array($rs, MYSQL_NUM)) {
				$id =$row[0];
			}
		}
		mysql_query ("SET NAMES 'utf8'");
		mysql_query("INSERT INTO `content` (`page_id`, `date`,`info`, `flag`) VALUES ('$id','$date','$info','0');");
	}
	if($act=='addlogo')	{	
	}
?>
